import { Column, Entity, ManyToOne, JoinColumn } from 'typeorm'
import { Admin } from 'src/modules/admin/entities/admin.entity'
import { App } from 'src/app.entity'
import { Staff } from 'src/modules/staff/entities/staff.entity'
@Entity()
export class Log extends App {
  @ManyToOne(() => Staff)
  @JoinColumn({ name: 'staff_id' })
  staff: Staff
  @Column({ type: 'varchar' })
  url: string
  @Column({ type: 'varchar', length: 10 })
  method: string
  @Column({ type: 'varchar', length: 20 })
  ip: string
  @Column({ type: 'int', nullable: true })
  code: number
  @Column({ type: 'varchar', length: 20 })
  date: string
}
